import { useState } from 'react'
import './index.less'
import { useNavigate } from 'react-router-dom'
type PropsType = {
  title: string
  link?: string
}
function Cell(props: PropsType) {
  const navigation = useNavigate()
  const toLink = () => {
    navigation(props.link ? props.link : `/collection`, { replace: false })
  }
  return (
    <div className='cell' onClick={toLink}>
      {props.title}
    </div>
  )

}
export default Cell